1. Field
The invention is in the field of phase and baseline correction of N-dimensional data such as spectral or imaging data, in need of such correction, obtained through nuclear magnetic resonance, electron spin resonance, ion cyclotron mass spectrometry, etc. The invention also applies to the field of shimming magnets used in equipment for collecting spectral or imaging data to increase the uniformity of fields produced by such magnets.
2. State of the Art
Various methods are used to obtain spectral or imaging data for a variety of purposes. The data obtained may be collected directly in the time or frequency domain or be converted from the time domain to the frequency domain through a Fourier Transform (FT). Data are usually obtained by perturbing an object to be studied and measuring the response from the object. For example, in nuclear magnetic resonance (NMR), an object is subjected to magnetic fields varying in both time and space. In the case of magnetic resonance imaging (MRI), the. spatial variation of the fields is of crucial importance. In the case of both imaging and spectroscopy, pulses of radio frequency electromagnetic energy are applied to cause a resonance phenomenon. Detectors measure the magnetic fluctuation in the object under study and provide data that are evaluated to determine various characteristics of the object. These magnetic fluctuations are oscillatory, and the frequency, phase and amplitude of the oscillations carry information about the sample. Because of various characteristics of the instrumentation, the phase and amplitude of the signals may be distorted. In order to obtain maximum information from the data, it must be corrected to remove these instrumental artifacts.
The most common method currently in use to phase correct spectral data is to manually adjust phasing parameters until the experimental data exhibit expected visual properties as observed by a spectroscopist. The extent of correction that can be accomplished manually is limited, and the outcome is subject to the biases of the spectroscopist. With most steps of the data collection and processing being automated, manual phasing is a weak link in the process.
Where frequency domain data are used, such data are generally obtained from time domain data through Fourier transformation. Fourier Transform methods generally yield a complex spectrum, i.e., a spectrum consisting of a real and an imaginary part. Ideally, the real part of such a spectrum would contain pure absorption mode spectral responses and the imaginary part would contain pure dispersion mode signals. However, a mismatch between reference and detector reference phase will introduce frequency-independent phase shifts, while delays between excitation and acquisition, frequency sweep excitation, and delays introduced by electronic filtering will produce a frequency dependent mixture of the two modes. For higher-dimensional spectra there is a similar problem associated with each dimension, thus manual correction of multidimensional spectra can become extremely tedious or even impossible.
Methods to avoid phase correction by processing and displaying the information in a phase independent way are in frequent use. However, such methods usually reduce the information content of the data and for most purposes phase sensitive data are preferable.
A pure absorption mode spectrum can be obtained from phase sensitive data by properly mixing real and imaginary parts at every point in the spectrum, a process called phase correction. The pure absorption mode yields data with the best resolution and sensitivity. Also aliased peaks can be identified by their anomalous phases, a detection which is not possible for phase insensitive spectra. In addition, positive and negative intensities can be distinguished and, if the spectra are taken carefully, the area under an absorption signal is proportional to the number of nuclei generating the signal.
A properly phased complex one-dimensional (1D) spectrum can be written as EQU F(.omega.)=A(.omega.)+i D(.omega.) [1]
wherein the real portion of the spectrum, Re[F(.omega.)]=A(.omega.), contains the absorption mode signals, and the imaginary portion of the spectrum, Im[F(.omega.)]=D(.omega.), the dispersion mode signals. In such equations, the angular frequency, .omega., has units of radians and is related to the frequency, .nu. by .nu.=.omega./(2.pi.). An experimental spectrum, G(.omega.) can show frequency-dependent phase shifts and is related to the well-phased spectrum F(.omega.) by the phase function, .phi.(.omega.), as follows: EQU G(.omega.)=F(.omega.)e.sup.-1.phi.(.omega.) [ 2]
Another notation in frequent use employs the opposite sign in the exponent and thereby shifts the phase angles by .pi..The relative phase shift between real and imaginary spectra would be -.pi./2 instead of .pi./2. Phase correction attempts to estimate F(.omega.) from the observed G(.omega.), typically by determining an approximate phase function .phi.'(.omega.). Often, for two or more test signals in the o.; spectrum G(.omega.), the phase angles at the transition frequencies of the chosen lines are determined. The accuracy of manual and some autophasing methods is limited since underdigitized spectra always appear to be somewhat poorly phased due to the sinc character of the observed line shape, making it desirable to use more objective criteria for phase adjustment.
Since signal phases are generally a slowly varying continuous function of the resonance frequency, a best-fit polynomial can be used to interpolate the phases of the test lines so as to correct every point in the spectrum. Phases in 1D spectra can only be determined within a multiple of 2.pi.. In higher-dimensional spectra a simultaneous phase shift in two orthogonal directions of .pi. does not change the appearance of the spectrum and in either case, optimum phases for the test resonances might need to be shifted by 2.pi. or .pi. before interpolation. The first two terms of a power series, the zero.sup.th and first order corrections .phi..sub.0 and .phi..sub.1, respectively, in: EQU .phi.'(.omega.)=.phi..sub.0 +.phi..sub.1 .omega.+.phi..sub.2 .omega..sup.2[ 3]
are often sufficient to achieve a satisfactory adjustment. This approach of "frequency-dependent" phase shifts is the only widely used method but it is not an accurate way of phase correcting a spectrum. In reality, spectra are a sum of lines, each with its own frequency-independent phase. The phase angle of a signal tail is determined not by its position in the spectrum, but by the phase angle at the signal's transition frequency. The use of the approximate phase function for phase correction of the spectrum G(.omega.) according to EQU F(.omega.)=G(.omega.)e.sup.1.phi.'(.omega.) [ 4]
modifies the line shape of the signals by the frequency-dependent phase shift of this equation and introduces baseline undulations.
Typically, "difficult" 1D spectra and some 2D spectra are phased manually using the experience of a trained spectroscopist. In higher-dimensional spectra and in imaging applications, "phase-independent" methods are currently often used because the amount of data involved are too great for manual phasing.
Several methods have been proposed for the automated phase correction of ID spectra. Ernst published the first article on autophasing methods in the Journal of Magnetic Resonance, 1969, 1, 7. The first method described by Ernst calculates the zero.sup.th order phase angle .phi..sub.0 with the following relationship: ##EQU1## where I.sub.r is the integral of the real part of the entire spectrum and I.sub.q is the corresponding integral of the imaginary spectrum. The calculated angle is then used to phase correct the data. By replacing the integrals by amplitudes in Equation 5, Montigny et al., in a method described in Analytical Chemistry, 1990, 62, 864, determines the phases for individual points in the spectrum near the signal maximum. These determined phases ar then used to correct the data. The second method described by Ernst is based on the ratio of maximum to minimum signal excursion. This ratio becomes infinite for pure absorption mode signals and it is unity for a dispersion mode signal. Ernst changed the spectral phase to maximize this ratio by an iterative procedure. When the ratio is maximized, the data are supposedly phased. Using a Simplex algorithm, Siegel, in a method described in Analytica Chimica Acta, 1981, 133, 103, used the maximization of signal height and the minimization of the area below the baseline as criteria for optimization. Daubenfeld et al., as described in the Journal of Magnetic Resonance, 1985, 62, 195, looked at both Ernst's second method criteria and Siegel's criteria and used an interpolation between spectral points with a Lorentzian line shape model to improve the optimization based on the criteria of maximum peak area, maximum signal height, and a new criterion, minimum remaining phase deviation, i.e., phase angle. If any one of these criteria are met, the data are assumed to be correctly phased by Daubenfeld's method.
Brown et al., Journal of Magnetic Resonance, 1989, 85, 15, used the Criteria of flat baseline and narrow line width at the base of the signal for phasing. Maximization of the number of spectral points inside a small region of amplitudes defined by the noise level around a flat baseline will yield phased spectra with signals in positive or negative absorption. Van Vaals and van Gerwen, Journal of Magnetic Resonance, 1990, 86, 127, proposed to determine the best spectral phasing by iteratively recalculating a crude spectral model with varying phase distortions, determining the phase function from the model and fitting this function to the phase function of the measured spectrum over both ends of the spectrum remote from the transition frequencies of lines of in vivo NMR spectra.
A plot of dispersion vs. absorption mode (DISPA), as described in Sotak et al., Journal of Magnetic Resonance 1984, 57, 453, Herring, F. G.; Phillips, P. S. Journal of Magnetic Resonance, 1984, 59, 489, and Craig, E. C.; Marshall, A. G. Journal of Magnetic Resonance 1988, 76, 458, initially used to analyze line shapes, allows one to determine the phase of an isolated Lorentzian line. If a Lorentzian line is misphased, the DISPA plot will show a circle with diameter equal to the absorption mode peak height rotated around the origin by the number of degrees equal to the phase misadjustment.
For the automated phase correction of symmetrical two-dimensional (2D) NMR spectra with absorptive in-phase diagonal (e.g., NOESY, HOHAHA, z-COSY), Cieslar et al., in Journal of Magnetic Resonance, 1988, 79, 154, proposed to maximize the sum of diagonal elements and subsequently to minimize the asymmetry of the diagonal peaks. For 2D spectra with dispersive (e.g., COSY) or absorptive-antiphase diagonal (e.g., DQF-COSY, E. COSY), the reverse must be carried out.
As long as the experimental spectrum has no baseline distortions, infinite signal-to-noise ratio (S/N), infinite digital resolution, and only isolated lines with Lorentzian line shapes, most methods described will produce a fairly well phased spectrum.
In real spectra, baseline distortions can be caused by several mechanisms and can hardly be avoided. Especially critical are instrumental artifacts like pulse breakthrough and probe ringing that distort the first few points in the FID and cause broad baseline distortions after FT. Long signal averaging times for dilute samples, strong and perhaps incompletely suppressed signals such as solvent lines, aliased dispersive tails of strong signals and unresolved broad resonances are further reasons for baseline distortions. None of the autophasing methods described so far is tolerant concerning these distortions. Especially sensitive are all methods based on integrals and van Vaal's method of determining phases from distant signals by fitting the phase function of a model to both ends of the phase function of the spectrum.
A method capable of phasing spectra at low S/N and low resolution will have to use all the information available concerning the signal phase. Methods based on only a few points around the signal maximum such as DISPA, maximum signal height, and ratio of maximum to minimum signal excursion neglect the phase information in the rest of a peak. Brown's method is limited to the phase information of the baseline and neglects the information of points at the signal maximum.
DISPA plots require at least three points with high S/N around the signal maximum and these points should have magnitudes above 60% of the magnitude maximum. This requires a rather well digitized spectrum. A typical carbon spectrum with line widths of 0.2 Hz and a spectral width of 200 ppm acquired on a 500 MHz instrument would require a digitization of 2.sup.18 .apprxeq.260,000 complex points, which is significantly higher than normally used for 1D spectra. This might be one of the reasons that Brown found this method to be "extremely unreliable for phasing typical .sup.1 H and .sup.13 C spectra." Similar problems ca be expected for all methods involving peak heights unless an interpolation with a line shape model is involved.
All methods are sensitive to signal overlap. In particular, the maximum of the spectral area doesn't correspond to a well-phased spectrum in the case of signal overlap.
Van Vaals, in U.S. Pat. No. 4,876,507, described a method involving the steps of:
(1) determining peak locations (e.g., for DISPA plots) from a modulus or power spectrum, PA1 (2) correcting overlapping peaks by means of the peak parameters determined, and PA1 (3) using a polynomial as a frequency-dependent phase function determined by a least-squares criterion to determine an overall phase function.
The determination of peak locations from a power spectrum has been shown by Herring and Phillips, Journal of Magnetic Resonance, 1984, 59, 495, and, using a best-fit polynomial as a phase function has been described by Daubenfeld et al., Journal of Magnetic Resonance, 1985, 62, 200, and by Craig and Marshall, Journal of Magnetic Resonance, 1988, 76, 461.
The Van Vaals patented method, as well as the other known methods described, while providing some measure of phase correction, leave much room for improvement in phase correction methods and results.
Much of the equipment used for obtaining the experimental data relies on a uniform magnetic field or linear magnetic field gradient during excitation of the object to be investigated. Any departure from these standards creates distortions which degrade resolution and signal-to-noise ratio of the data and are very difficult to correct after the data have been acquired. With such distortions, even when a signal is properly phase corrected, it may be difficult or impossible to obtain desired information from the signal. To avoid such distortions, in equipment such as nuclear magnetic resonance equipment, it is important that the magnetic field distortions over the sample volume be as small as possible. Improvements in field uniformity can be made by using additional magnetic fields produced by as many as 18 shim coils placed inside the main magnetic field. Such apparatus is shown in U.S. Pat. No. 3,569,823 as applied to superconducting solenoids and in U.S. Pat. No. 3,622,869 as applied to permanent magnets and electromagnets. The electrical current through these coils may be adjusted to cancel the inhomogeneity of the main magnet, a process called shimming. It is common for NMR spectra to contain features that are lifetime broadened only on the order of 5 parts in 10.sup.11. Current high resolution NMR superconducting magnets can be made homogeneous to the order of 5 parts in 10.sup.10 or better but may well be homogeneous to only one part per million without shimming. These shim currents are periodically adjusted to provide as uniform a main magnetic field as possible. Ideally, the shim currents should be adjusted for each object to be examined. Magnet shimming through adjustment of the current in the eighteen shim coils is generally done manually and is tedious and difficult due to the non orthogonality of the various shim coils.
The theory of shimming, magnetic field plots, and various methods of manual shimming are reviewed by Chmurny and Hoult in Concepts in Magnetic Resonance, 1990, 2, 131. Autoshimming routines have not found widespread acceptance due to their lack of reliability.
Ernst, in The Review of Scientific Instruments, 1968, 39(7), 998, suggested that criteria for use in determining magnetic field homogeneity could include various moments of an observed signal or derived criteria such as peak height and signal energy of a typical resonance line. Ernst suggested that such criteria might be used as a basis for automated adjustment of the magnet field homogeneity. Ernst compared the several methods and found that the peak height method was the most sensitive, and about four times more sensitive than a method using the second moment. The equipment used by Ernst had two shim coils. With only two shim coils, the peak height method in practice usually does not produce local optima of shim currents, thus, it is a simple matter to locate the desired global optimum. Because of the ease of determining peak height and the sensitivity with which peak height can be determined, it is the method that has been followed and is in general use today.
In today's equipment, where up to eighteen shim coils are used, the maximization of peak height is unreliable due to the presence of many inferior, local optima corresponding to different sets of shim settings. These local optima falsely indicate the desired global optimum and lead to incorrectly optimized shims. While Ernst recognized that false optima are not present using a moment criterion, he proposed that moments are difficult to determine because of noise and equipment problems and that moment measurements are insensitive. Further, the moment methods used by Ernst are limited to fine adjustments of the "spinning" shim coil currents because spinning of the sample creates spinning sidebands which have to be excluded from the analysis. To eliminate the spinning sidebands from the line shape analysis, the resonance region of the signal used must be limited to a narrow spectral region. This narrow window not only eliminates the spinning sidebands, but also eliminates signal tails which must be evaluated for proper determination of higher moments. Elimination of these tails destroys the argument that the moment methods do not produce local optima, i.e., if too small a window is used, a local optimum may be present.
Craig and Marshall in Journal of Magnetic Resonance, 1986, 68, 283 suggest minimization of the root-mean-square deviation from a best-fit Lorentzian to a frequency domain spectral peak and the minimization of the area under a radial difference DISPA plot as further methods of determining the optimum homogeneity of the magnetic field.
However, the minimization of the root-mean-square deviation from a best-fit Lorentzian suffers from insensitivity far away from the correct shim setting and local minima on the response surface might be encountered for this criterion. DISPA plots show similar distortions caused by phase and higher order shim misadjustments, and in said article only the sensitivity of z and z.sup.2 shims produced easily identifiable effects on the DISPA plot.
Again, there is room for improvement in the shimming methods.